namespace DotNetNuke.Common.Lists
{
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections;

    [Serializable]
    public class ListEntryInfoCollection : CollectionBase
    {
        private Hashtable mKeyIndexLookup = new Hashtable();

        public void Add(string key, ListEntryInfo value)
        {
            try
            {
                int index = base.List.Add(value);
                this.mKeyIndexLookup.Add(key.ToLower(), index);
            }
            catch (Exception exception1)
            {
                
                Exception ex = exception1;
                
            }
        }

        internal void Clear()
        {
            this.mKeyIndexLookup.Clear();
            base.Clear();
        }

        public ListEntryInfo GetChildren(string ParentName)
        {
            return this.Item(ParentName);
        }

        public ListEntryInfo Item(int index)
        {
            ListEntryInfo Item;
            try
            {
                Item = (ListEntryInfo) base.List[index];
            }
            catch (Exception exception1)
            {
                
                Exception Exc = exception1;
                Item = null;
                
                return Item;
                
            }
            return Item;
        }

        public ListEntryInfo Item(string key)
        {
            try
            {
                if (this.mKeyIndexLookup[key.ToLower()] == null)
                {
                    return null;
                }
            }
            catch (Exception exception1)
            {
                
                Exception ex = exception1;
                ListEntryInfo Item = null;
                
                return Item;
                
            }
            int index = Conversions.ToInteger(this.mKeyIndexLookup[key.ToLower()]);
            return (ListEntryInfo) base.List[index];
        }
    }
}

